Regular Expression Replace and Search

String Replace and Search with Regular Expressions

Text used for string.replace() and string.search() methods:
To be, or not to be: that is the question:
Whether 'tis nobler in the mind to suffer
The slings and arrows of outrageous fortune,
Or to take arms against a sea of troubles,
And by opposing end them. Enter a regular expression to match: Case-sensitive
Enter a string to replace the matching strings:

Result: